package me.khrystal.rxnews.common;

import android.support.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * @FileName: me.khrystal.rxnews.common.DataLoadType.java
 * @Fuction: 数据加载结果的类型
 * @author: kHRYSTAL
 * @email: 723526676@qq.com
 * @date: 2016-03-04 18:49
 * @UpdateUser:
 * @UpdateDate:
 */
public class DataLoadType {
    /**
     * Refresh Success
     */
    @DataLoadType.DataLoadTypeChecker
    public static final int TYPE_REFRESH_SUCCESS = 1;
    /**
     * Refresh Fail
     */
    @DataLoadType.DataLoadTypeChecker
    public static final int TYPE_REFRESH_FAIL = 2;

    /**
     * Load
     */
    @DataLoadType.DataLoadTypeChecker
    public static final int TYPE_LOAD_MORE_SUCCESS = 3;

    /**
     * Load Failed
     */
    @DataLoadType.DataLoadTypeChecker
    public static final int TYPE_LOAD_MORE_FAIL = 4;

    /**
     * 替换枚举 保证数据安全
     */
    @IntDef({TYPE_REFRESH_SUCCESS,TYPE_REFRESH_FAIL,TYPE_LOAD_MORE_SUCCESS,TYPE_LOAD_MORE_FAIL})
    @Retention(RetentionPolicy.SOURCE)
    public @interface DataLoadTypeChecker{

    }
}
